package com.boyi.cycling_master.application;

import android.app.Application;

import com.boyi.cycling_master.bean.LoginResponseBean;

import org.litepal.LitePal;
import org.litepal.crud.DataSupport;

/**
 *
 * @date 2017/8/11/011 10:34
 *
 * @author Lee_Mofeel
 *
 * @version 1.0
 *
 * @Description Application
 *              负责全局变量的初始化
 *              litePal
 *
 */

public class CyclingApplication extends Application {
    private static CyclingApplication application;

    public static CyclingApplication getInstance() {
        return application;
    }
    private LoginResponseBean.DataCollectionBean userInfo;
    public LoginResponseBean.DataCollectionBean getUserInfo(){
        return DataSupport.findFirst(LoginResponseBean.DataCollectionBean.class);
    }

    @Override
    public void onCreate() {
        super.onCreate();
        application = this;
        LitePal.initialize(getBaseContext());
    }


}
